$("#Msg_DataReport").dialog({
			modal: true,
			autoOpen: false,
			buttons: {
				'关闭': function() {
					$(this).dialog('close');
					$("#Msg_DataReport").html("");
				}
			}
		});
function showMsg(msg)
{
	$("#Msg_DataReport").html(msg)
	$("#Msg_DataReport").dialog('open')
}

function  BeginAnalysis()
{
	var courseName=$('#courseName').val();
	var studentNumber=$("#show_number").html();
	if($("#show_name").html()=='管理员')
	{
		studentNumber=$('#student_number_4Admin').val();
	}
	if(!CheckNumber(studentNumber))
	{
		showMsg("输入数字作为学号")
	}
	else
	{
		$("#myrecordloading").removeClass("hide");
		$.ajax({
            type: 'Post',
            url: '/report_gen_fromStudentNumberANDCourse',
            data: "courseName="+courseName+"&studentNumber="+studentNumber,
			dataType:"json",
            success: function(response) {
				var dataArray=new Array();
				$(response.course).each(function(i)
							{
								dataArray.push(parseInt(this));
							})
				var dataName=$("#courseName option:selected").text(); 
                HightChartgenerate_Course(dataName,dataArray);
				$("#show_myrecord").css("display","none");
				$("#hide_myrecord").css("display","block");
				$("#myrecord").css("display","block");
				$("#myrecordloading").addClass("hide");
				
				
				dataArray=new Array();
				$(response.order).each(function(i)
							{
								dataArray.push(parseInt(this));
							})
				HightChartgenerate_Order(dataName,dataArray);
				$("#show_mysort").css("display","none");
				$("#hide_mysort").css("display","block");
				$("#mysort").css("display","block");
				
				$("#mysortloading").addClass("hide");
            }
        })
	}
}

